package packed

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gctx"
	"video-api/internal/logic/pay"
	"video-api/utility/login_tool"
	"video-api/utility/login_tool/facebook"
	"video-api/utility/login_tool/google"
)

func init() {
	var ctx = gctx.New()
	login_tool.UseProviders(
		google.New(
			g.Cfg().MustGet(ctx, "auth2.google.clientKey").String(),
			g.Cfg().MustGet(ctx, "auth2.google.secret").String(),
			g.Cfg().MustGet(ctx, "auth2.google.callbackURL").String(),
		),
		facebook.New(
			g.Cfg().MustGet(ctx, "auth2.facebook.clientKey").String(),
			g.Cfg().MustGet(ctx, "auth2.facebook.secret").String(),
			g.Cfg().MustGet(ctx, "auth2.facebook.callbackURL").String(),
		),
	)

	pay.PayPalClient(g.Cfg().MustGet(ctx, "pay.paypal.clientID").String(), g.Cfg().MustGet(ctx, "pay.paypal.secret").String())
}
